﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Liber;

namespace FlashQ.Main.Pay
{
    public static class PayHelper
    {
        static AliPay aliPaySvc = new AliPay();

        public static FnResult<DyObject> NewAppPay(string provider, string ord_no, decimal total_amount, string subject) {

            switch (provider) {
                case "alipay":
                return aliPaySvc.NewAppPay(ord_no,total_amount,subject);
            }

            return FnResult<DyObject>.Failure("PaySvc", "UnknowProvider");
        }
    }

    public interface IPayProvider
    {
        public FnResult<DyObject> NewAppPay(string trade_no, decimal total_amount, string subject);
    }
}
